package com.woniuxy.light_smart.controller;

import com.woniuxy.light_smart.entity.FacilityStates;
import com.woniuxy.light_smart.service.FacilityStatesService;
import com.woniuxy.light_smart.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("FStates")
public class FacilityStatesController {
    @Autowired
    private FacilityStatesService facilityStatesService;

    @GetMapping("")
    public Result getAll(){
        List<FacilityStates> facilityStates = facilityStatesService.selAll();
        return Result.ok().data("states",facilityStates);
    }
}
